3.226 \(\int \sqrt {a+\frac {b}{x}} (c+\frac {d}{x}) \, dx\)

Optimal. Leaf size=74 \[ -\frac {\sqrt {a+\frac {b}{x}} (2 a d+b c)}{a}+\frac {(2 a d+b c) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {c x \left (a+\frac {b}{x}\right )^{3/2}}{a} \]

[Out]

c*(a+b/x)^(3/2)*x/a+(2*a*d+b*c)*arctanh((a+b/x)^(1/2)/a^(1/2))/a^(1/2)-(2*a*d+b*c)*(a+b/x)^(1/2)/a

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {375, 78, 50, 63, 208} \[ -\frac {\sqrt {a+\frac {b}{x}} (2 a d+b c)}{a}+\frac {(2 a d+b c) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {c x \left (a+\frac {b}{x}\right )^{3/2}}{a} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b/x]*(c + d/x),x]

[Out]

-(((b*c + 2*a*d)*Sqrt[a + b/x])/a) + (c*(a + b/x)^(3/2)*x)/a + ((b*c + 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/
Sqrt[a]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 375

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> -Subst[Int[((a + b/x^n)^p*(c +
 d/x^n)^q)/x^2, x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right ) \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x} (c+d x)}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=\frac {c \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {\left (\frac {b c}{2}+a d\right ) \operatorname {Subst}\left (\int \frac {\sqrt {a+b x}}{x} \, dx,x,\frac {1}{x}\right )}{a}\\ &=-\frac {(b c+2 a d) \sqrt {a+\frac {b}{x}}}{a}+\frac {c \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {1}{2} (b c+2 a d) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=-\frac {(b c+2 a d) \sqrt {a+\frac {b}{x}}}{a}+\frac {c \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {(b c+2 a d) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b}\\ &=-\frac {(b c+2 a d) \sqrt {a+\frac {b}{x}}}{a}+\frac {c \left (a+\frac {b}{x}\right )^{3/2} x}{a}+\frac {(b c+2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 52, normalized size = 0.70 \[ \sqrt {a+\frac {b}{x}} (c x-2 d)+\frac {(2 a d+b c) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b/x]*(c + d/x),x]

[Out]

Sqrt[a + b/x]*(-2*d + c*x) + ((b*c + 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

fricas [A]  time = 1.50, size = 128, normalized size = 1.73 \[ \left [\frac {{\left (b c + 2 \, a d\right )} \sqrt {a} \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, {\left (a c x - 2 \, a d\right )} \sqrt {\frac {a x + b}{x}}}{2 \, a}, -\frac {{\left (b c + 2 \, a d\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) - {\left (a c x - 2 \, a d\right )} \sqrt {\frac {a x + b}{x}}}{a}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)*(a+b/x)^(1/2),x, algorithm="fricas")

[Out]

[1/2*((b*c + 2*a*d)*sqrt(a)*log(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b) + 2*(a*c*x - 2*a*d)*sqrt((a*x + b)/
x))/a, -((b*c + 2*a*d)*sqrt(-a)*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a) - (a*c*x - 2*a*d)*sqrt((a*x + b)/x))/a]

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)*(a+b/x)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Warn
ing, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):Check [ab
s(x)]Warning, choosing root of [1,0,%%%{-2,[1,2,0]%%%}+%%%{-2,[1,0,0]%%%}+%%%{-2,[0,1,1]%%%},0,%%%{1,[2,4,0]%%
%}+%%%{-2,[2,2,0]%%%}+%%%{1,[2,0,0]%%%}+%%%{2,[1,3,1]%%%}+%%%{-2,[1,1,1]%%%}+%%%{1,[0,2,2]%%%}] at parameters
values [86,-97,-82]Warning, choosing root of [1,0,%%%{-2,[1,2,0]%%%}+%%%{-2,[1,0,0]%%%}+%%%{-2,[0,1,1]%%%},0,%
%%{1,[2,4,0]%%%}+%%%{-2,[2,2,0]%%%}+%%%{1,[2,0,0]%%%}+%%%{2,[1,3,1]%%%}+%%%{-2,[1,1,1]%%%}+%%%{1,[0,2,2]%%%}]
at parameters values [7,-27,26]Warning, choosing root of [1,0,%%%{-2,[1,2,0]%%%}+%%%{-2,[1,0,0]%%%}+%%%{-2,[0,
1,1]%%%},0,%%%{1,[2,4,0]%%%}+%%%{-2,[2,2,0]%%%}+%%%{1,[2,0,0]%%%}+%%%{2,[1,3,1]%%%}+%%%{-2,[1,1,1]%%%}+%%%{1,[
0,2,2]%%%}] at parameters values [-89,63,-49]Warning, choosing root of [1,0,%%%{-4,[1,0,0]%%%}+%%%{-2,[0,1,1]%
%%},0,%%%{1,[0,2,2]%%%}] at parameters values [61.7937478349,-30,70]Warning, choosing root of [1,0,%%%{-4,[1,0
,0]%%%}+%%%{-2,[0,1,1]%%%},0,%%%{1,[0,2,2]%%%}] at parameters values [73.519035968,-9,-13]Warning, choosing ro
ot of [1,0,%%%{-2,[1,0,1]%%%}+%%%{-4,[0,1,0]%%%},0,%%%{1,[2,0,2]%%%}] at parameters values [18,15.451549686,-3
3]Sign error (%%%{-b,0%%%}+%%%{2*sqrt(a)*sqrt(b),1/2%%%}+%%%{-2*a,1%%%}+%%%{a*sqrt(a)*sqrt(b)/b,3/2%%%}+%%%{-a
^2*sqrt(a)*sqrt(b)/(4*b^2),5/2%%%}+%%%{undef,7/2%%%})Limit: Max order reached or unable to make series expansi
on Error: Bad Argument Value

________________________________________________________________________________________

maple [B]  time = 0.06, size = 163, normalized size = 2.20 \[ \frac {\sqrt {\frac {a x +b}{x}}\, \left (2 a b d \,x^{2} \ln \left (\frac {2 a x +b +2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}}{2 \sqrt {a}}\right )+b^{2} c \,x^{2} \ln \left (\frac {2 a x +b +2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}}{2 \sqrt {a}}\right )+4 \sqrt {a \,x^{2}+b x}\, a^{\frac {3}{2}} d \,x^{2}+2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}\, b c \,x^{2}-4 \left (a \,x^{2}+b x \right )^{\frac {3}{2}} \sqrt {a}\, d \right )}{2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}\, b x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d/x)*(a+b/x)^(1/2),x)

[Out]

1/2*((a*x+b)/x)^(1/2)*(4*a^(3/2)*(a*x^2+b*x)^(1/2)*x^2*d+2*a^(1/2)*(a*x^2+b*x)^(1/2)*x^2*b*c+2*ln(1/2*(2*a*x+b
+2*(a*x^2+b*x)^(1/2)*a^(1/2))/a^(1/2))*x^2*a*b*d+ln(1/2*(2*a*x+b+2*(a*x^2+b*x)^(1/2)*a^(1/2))/a^(1/2))*x^2*b^2
*c-4*a^(1/2)*(a*x^2+b*x)^(3/2)*d)/x/((a*x+b)*x)^(1/2)/b/a^(1/2)

________________________________________________________________________________________

maxima [A]  time = 1.37, size = 106, normalized size = 1.43 \[ \frac {1}{2} \, {\left (2 \, \sqrt {a + \frac {b}{x}} x - \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}}\right )} c - {\left (\sqrt {a} \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right ) + 2 \, \sqrt {a + \frac {b}{x}}\right )} d \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)*(a+b/x)^(1/2),x, algorithm="maxima")

[Out]

1/2*(2*sqrt(a + b/x)*x - b*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a)))/sqrt(a))*c - (sqrt(a)*log(
(sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a))) + 2*sqrt(a + b/x))*d

________________________________________________________________________________________

mupad [B]  time = 1.96, size = 92, normalized size = 1.24 \[ 2\,\sqrt {a}\,d\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )-2\,d\,\sqrt {a+\frac {b}{x}}+c\,x\,\sqrt {a\,x^2+b\,x}\,\sqrt {\frac {1}{x^2}}+\frac {b\,c\,x\,\ln \left (\frac {\frac {b}{2}+a\,x+\sqrt {a}\,\sqrt {a\,x^2+b\,x}}{\sqrt {a}}\right )\,\sqrt {\frac {1}{x^2}}}{2\,\sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/x)^(1/2)*(c + d/x),x)

[Out]

2*a^(1/2)*d*atanh((a + b/x)^(1/2)/a^(1/2)) - 2*d*(a + b/x)^(1/2) + c*x*(b*x + a*x^2)^(1/2)*(1/x^2)^(1/2) + (b*
c*x*log((b/2 + a*x + a^(1/2)*(b*x + a*x^2)^(1/2))/a^(1/2))*(1/x^2)^(1/2))/(2*a^(1/2))

________________________________________________________________________________________

sympy [A]  time = 41.31, size = 87, normalized size = 1.18 \[ - \frac {2 a d \operatorname {atan}{\left (\frac {\sqrt {a + \frac {b}{x}}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + \sqrt {b} c \sqrt {x} \sqrt {\frac {a x}{b} + 1} - 2 d \sqrt {a + \frac {b}{x}} + \frac {b c \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{\sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)*(a+b/x)**(1/2),x)

[Out]

-2*a*d*atan(sqrt(a + b/x)/sqrt(-a))/sqrt(-a) + sqrt(b)*c*sqrt(x)*sqrt(a*x/b + 1) - 2*d*sqrt(a + b/x) + b*c*asi
nh(sqrt(a)*sqrt(x)/sqrt(b))/sqrt(a)

________________________________________________________________________________________